<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>

        class Person{
            constructor(name, age){
                this.name = name;
                this.age = age;
            }

            sayHello(){
                console.log('Hello, my name is ' + this.name);
            }
        }

        var p = new Person('zs', 20);
        p.sayHello()

    </script>
</body>
</html>